package com.sdry.service.impl.zc;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.sdry.mapper.zc.ZcNumberedMapper;
import com.sdry.model.zc.ZcNumberedEntity;
import com.sdry.model.zc.ZcProductInspectionEntity;
import com.sdry.model.zc.ZcProductTestEntity;
import com.sdry.model.zc.ZcTestEntity;
import com.sdry.service.zc.ZcNumberedService;
/**
 * 
 * @ClassName:    ZcNumberedServiceImpl   
 * @Description:  数点
 * @Author:       zc   
 * @CreateDate:   2018年10月9日 下午5:05:27   
 * @Version:      v1.0
 */
@Service
public class ZcNumberedServiceImpl implements ZcNumberedService{
	@Resource
	private ZcNumberedMapper zcNumberedMapper;
	/**
	 * 查询产品报检单列表
	 */
	@Override
	public List<ZcProductInspectionEntity> selectProductInspectionList() {
		return zcNumberedMapper.selectProductInspectionList();
	}
	/**
	 * 通过报检单号查询报检单信息
	 */
	@Override
	public ZcProductInspectionEntity selectProductInspection(String keyword) {
		return zcNumberedMapper.selectProductInspection(keyword);
	}
	/**
	 * 保存产品质检单信息
	 */
	@Override
	public int insertProductTest(ZcProductTestEntity zcProductTestEntity) {
		return zcNumberedMapper.insertProductTest(zcProductTestEntity);
	}
	/**
	 * 保存数点结果
	 */
	@Override
	public int insertNumbered(ZcNumberedEntity zcNumberedEntity) {
		return zcNumberedMapper.insertNumbered(zcNumberedEntity);
	}
	/**
	 * 通过组件条码查询质检单信息
	 */
	@Override
	public ZcProductTestEntity selectProductTest(String code) {
		return zcNumberedMapper.selectProductTest(code);
	}
	/**
	 * 查询这个产品是否已经数点
	 * @param ptCode
	 * @return
	 */
	@Override
	public int countNumberByCode(String ptCode) {
		return zcNumberedMapper.countNumberByCode(ptCode);
	}
	/**
	 * 查询报检单已经数点产品数
	 * @param ptCode
	 * @return
	 */
	@Override
	public int countProductTestByPiNumber(String piNumber) {
		return zcNumberedMapper.countProductTestByPiNumber(piNumber);
	}
	/**
	 * 解绑台车
	 * @param piNumber
	 * @return
	 */
	@Override
	public int unbundle(String piNumber) {
		return zcNumberedMapper.unbundle(piNumber);
	}
}
